//
//  AdaptiveViewViewController.m
//  SDKSample
//
//  Created by 小肥羊 on 15/7/3.
//  Copyright (c) 2015年 Zhu‘s Game House. All rights reserved.
//

#import "AdaptiveViewViewController.h"

@interface AdaptiveViewViewController ()

@end

@implementation AdaptiveViewViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    XFYAdaptiveLabel *xfyLabel = [[XFYAdaptiveLabel alloc] initWithPoint:CGPointMake(0, 72)];
    [xfyLabel setText:@"文德立顿"];
    [self.view addSubview:xfyLabel];
    
    NSMutableArray *array = [[NSMutableArray alloc] initWithObjects:@"文德立顿阳光大厦文德立顿阳光大厦文德立顿阳", @"文德立顿阳光大厦", @"cc", @"文德立顿阳光大厦文德立顿阳光大厦文德立顿阳光大厦", @"挂了", @"这是什么啊", @"我还要多加一个", nil];
    self.labelList = [[XFYLabelList alloc] initWithFrame:CGRectMake(0, 100, self.view.frame.size.width, 100) withArray:array];
    [self.view addSubview:self.labelList];
    
    
    self.adaptiveView = [[XFYAdaptiveView alloc] initWithFrame:self.view.frame];
    [self.adaptiveView.textLabel setText:@"文德立顿阳光大厦文德立顿阳光大厦文德立顿阳"];
    
    
    XFYFixedLabel *fixedLabel = [[XFYFixedLabel alloc] initWithFrame:CGRectMake(0, 260, self.view.frame.size.width/2, 30)];
    [fixedLabel.textLabel setText:@"文德立顿阳光大厦文德立顿阳光大厦文德立顿阳"];
    [self.view addSubview:fixedLabel];
    
    NSMutableArray *array2 = [[NSMutableArray alloc] initWithObjects:@"文德立顿阳光大厦文德立顿阳光大厦文德立顿阳", @"文德立顿阳光大厦", @"cc", @"文德立顿阳光大厦文德立顿阳光大厦文德立顿阳光大厦", @"挂了", @"这是什么啊", @"我还要多加一个", nil];
    self.fixedList = [[XFYFixedLabelList alloc] initWithFrame:CGRectMake(0, 300, self.view.frame.size.width, 100) withArray:array2];
    [self.view addSubview:self.fixedList];
}

- (IBAction)setList:(UIButton *)sender {
    NSMutableArray *array = [[NSMutableArray alloc] initWithObjects:@"这是什么啊", @"这是什么啊", @"这是什么啊", @"这是什么啊", @"挂了", @"这是什么啊", nil];
    //[self.labelList setTextList:array];
    self.labelList.textArray = array;
}

- (IBAction)showAdaptiveView:(UIButton *)sender {
    [self.view addSubview:self.adaptiveView];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
